Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port the Memoize view into xilem_core #72

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

Philipp-M
Copy link
Contributor

This ports the memoize view into xilem_core as macro.

I haven't added documentation yet (this could probably be its own PR I think...), it's basically just a copy of the original prototype, adjusted to be compilable again.
I've added two functions, one for a static view and one that just wraps the Memoize view (see it in action e.g. here or here)

I guess these extra functions (including their names) are likely a point to discuss still. Especially the static view function could probably be a macro (but I think the syntactic sugar benefits are marginal, by avoiding the extra closure)

Copy link
Contributor

@richard-uk1 richard-uk1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

We should standardize naming/location in a follow-up PR. I think the generate_ prefix is the better name, but putting the macro in a view submodule is tidier.

@richard-uk1 richard-uk1 merged commit 91be463 into linebender:main Jul 5, 2023
@Philipp-M Philipp-M deleted the memoize-view branch July 6, 2023 09:29
@Philipp-M Philipp-M restored the memoize-view branch March 13, 2024 22:12
@Philipp-M Philipp-M deleted the memoize-view branch March 13, 2024 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants